import {
    searchCatoryList
} from "@/api"

const state = {
    searchCatoryList: []
}

const actions = {
    async getSearchCatoryList({
        commit
    }) {
        const result = await searchCatoryList();
        if (result.code == 200) {
            commit('GET_SEARCH_CATORY_LIST', result.searchCatoryList);
        }
    }
}

const mutations = {
    GET_SEARCH_CATORY_LIST(state, searchCatoryList) {
        state.searchCatoryList = searchCatoryList;
    }
}

const getters = {
    searchCatoryList(state) {
        return state.searchCatoryList;
    }
}

export default {
    state,
    actions,
    mutations,
    getters
}